package com.yunyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yunyi.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 机构表
 * @TableName sys_office
 */
@TableName(value ="sys_office")
public class SysOffice extends BaseEntity {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 父级编号
     */
    @TableField(value = "parent_id")
    private Integer parent_id;

    /**
     * 所有父级编号
     */
    @TableField(value = "parent_ids")
    private String parent_ids;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 排序
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 归属区域
     */
    @TableField(value = "area_id")
    private String area_id;

    /**
     * 区域编码
     */
    @TableField(value = "code")
    private String code;

    /**
     * 机构类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 机构等级
     */
    @TableField(value = "grade")
    private String grade;

    /**
     * 联系地址
     */
    @TableField(value = "address")
    private String address;

    /**
     * 邮政编码
     */
    @TableField(value = "zip_code")
    private String zip_code;

    /**
     * 负责人
     */
    @TableField(value = "master")
    private String master;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 传真
     */
    @TableField(value = "fax")
    private String fax;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 是否启用
     */
    @TableField(value = "USEABLE")
    private String useable;

    /**
     * 主负责人
     */
    @TableField(value = "PRIMARY_PERSON")
    private String primary_person;

    /**
     * 副负责人
     */
    @TableField(value = "DEPUTY_PERSON")
    private String deputy_person;

    /**
     * 删除标记
     */
    @TableField(value = "del_flag")
    private String del_flag;

    /**
     * 企业帐套
     */
    @TableField(value = "account_id")
    private String account_id;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private List<SysOffice> children;

    @TableField(exist = false)
    private String area;

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public List<SysOffice> getChildren() {
        return children;
    }

    public void setChildren(List<SysOffice> children) {
        this.children = children;
    }

    /**
     * 编号
     */
    public Integer getId() {
        return id;
    }

    /**
     * 编号
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 父级编号
     */
    public Integer getParent_id() {
        return parent_id;
    }

    /**
     * 父级编号
     */
    public void setParent_id(Integer parent_id) {
        this.parent_id = parent_id;
    }

    /**
     * 所有父级编号
     */
    public String getParent_ids() {
        return parent_ids;
    }

    /**
     * 所有父级编号
     */
    public void setParent_ids(String parent_ids) {
        this.parent_ids = parent_ids;
    }

    /**
     * 名称
     */
    public String getName() {
        return name;
    }

    /**
     * 名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 排序
     */
    public Integer getSort() {
        return sort;
    }

    /**
     * 排序
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     * 归属区域
     */
    public String getArea_id() {
        return area_id;
    }

    /**
     * 归属区域
     */
    public void setArea_id(String area_id) {
        this.area_id = area_id;
    }

    /**
     * 区域编码
     */
    public String getCode() {
        return code;
    }

    /**
     * 区域编码
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 机构类型
     */
    public String getType() {
        return type;
    }

    /**
     * 机构类型
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 机构等级
     */
    public String getGrade() {
        return grade;
    }

    /**
     * 机构等级
     */
    public void setGrade(String grade) {
        this.grade = grade;
    }

    /**
     * 联系地址
     */
    public String getAddress() {
        return address;
    }

    /**
     * 联系地址
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 邮政编码
     */
    public String getZip_code() {
        return zip_code;
    }

    /**
     * 邮政编码
     */
    public void setZip_code(String zip_code) {
        this.zip_code = zip_code;
    }

    /**
     * 负责人
     */
    public String getMaster() {
        return master;
    }

    /**
     * 负责人
     */
    public void setMaster(String master) {
        this.master = master;
    }

    /**
     * 电话
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 电话
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 传真
     */
    public String getFax() {
        return fax;
    }

    /**
     * 传真
     */
    public void setFax(String fax) {
        this.fax = fax;
    }

    /**
     * 邮箱
     */
    public String getEmail() {
        return email;
    }

    /**
     * 邮箱
     */
    public void setEmail(String email) {
        this.email = email;
    }

    public String getUseable() {
        return useable;
    }

    public void setUseable(String useable) {
        this.useable = useable;
    }

    public String getPrimary_person() {
        return primary_person;
    }

    public void setPrimary_person(String primary_person) {
        this.primary_person = primary_person;
    }

    public String getDeputy_person() {
        return deputy_person;
    }

    public void setDeputy_person(String deputy_person) {
        this.deputy_person = deputy_person;
    }

    /**
     * 删除标记
     */
    public String getDel_flag() {
        return del_flag;
    }

    /**
     * 删除标记
     */
    public void setDel_flag(String del_flag) {
        this.del_flag = del_flag;
    }

    /**
     * 企业帐套
     */
    public String getAccount_id() {
        return account_id;
    }

    /**
     * 企业帐套
     */
    public void setAccount_id(String account_id) {
        this.account_id = account_id;
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", parent_id=").append(parent_id);
        sb.append(", parent_ids=").append(parent_ids);
        sb.append(", name=").append(name);
        sb.append(", sort=").append(sort);
        sb.append(", area_id=").append(area_id);
        sb.append(", code=").append(code);
        sb.append(", type=").append(type);
        sb.append(", grade=").append(grade);
        sb.append(", address=").append(address);
        sb.append(", zip_code=").append(zip_code);
        sb.append(", master=").append(master);
        sb.append(", phone=").append(phone);
        sb.append(", fax=").append(fax);
        sb.append(", email=").append(email);
        sb.append(", USEABLE=").append(useable);
        sb.append(", PRIMARY_PERSON=").append(primary_person);
        sb.append(", DEPUTY_PERSON=").append(deputy_person);
        sb.append(", create_by=").append(getCreateBy());
        sb.append(", create_date=").append(getCreateTime());
        sb.append(", update_by=").append(getUpdateBy());
        sb.append(", update_date=").append(getUpdateBy());
        sb.append(", remarks=").append(getRemark());
        sb.append(", del_flag=").append(del_flag);
        sb.append(", account_id=").append(account_id);
        sb.append(", children=").append(getChildren());
        sb.append(", area=").append(getArea());
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}